<template>
  <div v-if="comIsTable">
    <div :style="setStyle" v-if="column.disableHtmlEncode">{{format(curData,column)}}</div>
    <div :style="setStyle" v-else v-html="format(curData,column)"></div>
  </div>
  <div v-else>
    <div v-if="$data.data.column.disableHtmlEncode">{{format($data.data[$data.data.column.field],$data.data.column)}}</div>
    <div v-else v-html="format($data.data[$data.data.column.field],$data.data.column)"></div>
  </div>
</template>

<script>
// import { formatFunction } from '@/utils/format'
import mixinTableFormat from './table-format'
export default {
  mixins:[mixinTableFormat],
  data () {
    return {}
  },
  methods: {
    format (value, data) {
      if (data.type === 'number') {
        if (!value) {
          value = 0
        }
      }
      return value
    }
  }
}
</script>
